package com.xs.anxingo.server.api.resp;

import com.xs.anxingo.server.dto.BaseDto;
import lombok.Getter;
import lombok.Setter;

/**
 * Created by Administrator on 2019/12/10.
 */
@Getter
@Setter
public class BaseResponse<T> extends BaseDto {

    private String status;
    private String info;
    private T data;

    public static BaseResponse buildSuccess() {
        BaseResponse response = new BaseResponse();
        response.setStatus("0000");
        response.setInfo("请求成功");
        return response;
    }

    public static BaseResponse buildSuccess(Object data) {
        BaseResponse response = new BaseResponse();
        response.setStatus("0000");
        response.setInfo("请求成功");
        response.setData(data);
        return response;
    }

}
